<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 社交</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
</head>

<style>
    .sk-spinner-fading-circle .sk-circle:before{
        background-color:white
    }
    .sk-spinner-wave div{
        background-color:white
    }
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">

            <div class="col-sm-12">
                <div class="ibox">
                    <div class="ibox-content text-center">

                        <h3 class="m-b-xxs">反馈详情</h3>
                    </div>

                </div>

                <div class="social-feed-box">

                    <div class="social-avatar">
                        <a href="__MODULE__/User/user_detail/u_id/<{$detail.u_id}>" class="pull-left">
                            <img alt="image" src="__PUBLIC__/admin/img/kehu.jpg" >
                        </a>
                        <div class="media-body">
                            <a href="__MODULE__/User/user_detail/vid/<{$detail.vid}>">
                                        <{$detail.username}>
                                    </a>
                            <small style="color:#777" class="text-muted"><{$detail.ctime|date='Y-m-d H:i:s',###}></small>
                        </div>
                    </div>
                    <div class="social-body" style="padding:15px 15px 0 15px">
                        <switch name="detail.status">

                            <case value="3"><button class="btn btn-primary">已完成</button></case>
                        </switch>

                    </div>

                    <div class="social-body">
                        <p style="font-size: 1.5rem;">
                            <{$detail.content}>
                        </p>
                        <foreach name="detail.img" item="img">
                        <a href="<{$img}>" class="fancybox"><img src="<{$img}>" class="img-responsive" style="width: 200px;margin-right: 10px;display: inline;margin-bottom: 0"></a>
                        </foreach>
                    </div>
                    <!--&lt;!&ndash;<div class="btn-group" style="margin-bottom: 10px;margin-left: 15px;">&ndash;&gt;-->
                        <!--&lt;!&ndash;<button class="btn btn-white btn-xs"><i class="fa fa-thumbs-up"></i> 赞</button>&ndash;&gt;-->
                        <!--&lt;!&ndash;<button class="btn btn-white btn-xs"><i class="fa fa-comments"></i> 评论</button>&ndash;&gt;-->
                        <!--&lt;!&ndash;<button class="btn btn-white btn-xs"><i class="fa fa-share"></i> 分享</button>&ndash;&gt;-->
                    <!--&lt;!&ndash;</div>&ndash;&gt;-->
                    <!--<div class="social-footer">-->
                        <!--<foreach name="detail.message" item="message">-->
                        <!--<div class="social-comment">-->
                            <!--<a href="" class="pull-left">-->
                                <!--<if condition="$message['vid'] eq '0'">-->
                                    <!--<img alt="image" src="__PUBLIC__/admin/img/huifu.jpg">-->
                                <!--<else/>-->
                                    <!--<img alt="image" src="__PUBLIC__/admin/img/kehu.jpg">-->
                                <!--</if>-->
                            <!--</a>-->
                            <!--<div class="media-body">-->
                                <!--<if condition="$message['vid'] neq '0'">-->
                                <!--<a href="__MODULE__/User/user_detail/vid/<{$detail.vid}>">-->
                                    <!--<{$detail.username}>：-->
                                        <!--</a>-->
                                <!--<else/>-->
                                    <!--<a href="javascript:void(0)">-->
                                    <!--<{$message.admin_name}>：-->
                                        <!--</a>-->
                                <!--</if>-->
                                <!--<{$message.content}>-->
                                <!--<br/>-->
                                <!--&lt;!&ndash;<a href="#" class="small"><i class="fa fa-thumbs-up"></i> 26</a> - &ndash;&gt;-->
                                <!--<small style="color:#777" class="text-muted"><{$message.ctime|date='Y-m-d H:i:s',###}></small>-->
                            <!--</div>-->
                            <!--<div style="margin: 10px 45px;">-->

                                <!--<foreach name="message.img" item="imgs">-->
                                    <!--<a href="<{$imgs}>" class="fancybox"><img src="<{$imgs}>" class="img-responsive" style="width: 50px;margin-right: 10px;display: inline;margin-bottom: 0"></a>-->
                                <!--</foreach>-->

                            <!--</div>-->

                        <!--</div>-->
                        <!--</foreach>-->

                    <!--<if condition="$detail['status'] neq '3'">-->
                        <!--<div class="social-comment">-->
                            <!--<form class="form-horizontal" enctype="multipart/form-data">-->
                            <!--<a href="" class="pull-left">-->
                                <!--<img alt="image" src="__PUBLIC__/admin/img/huifu.jpg">-->
                            <!--</a>-->
                            <!--<div class="media-body">-->
                                <!--<textarea class="form-control" id="content" placeholder="填写评论..." style="height: 10rem"></textarea>-->
                            <!--</div>-->

                            <!--<div class="form-group">-->
                                <!--<input type="file" onchange="uploadimgs()" id="uploadimg" name="uploadimg" style="display:none" accept="image/jpeg,image/jpg,image/png" value="">-->
                               <!--&lt;!&ndash;图片上传&ndash;&gt;-->
                                <!--<div class="" id="newimg">-->
                                    <!--<label  for="uploadimg"> <img id="upload" style="margin: 10px 0 0 60px;height: 60px;width: 60px;" src="__PUBLIC__/admin/img/webuploader.png" /></label>-->
                                    <!--<a class="btn btn-success" style="margin: 10px 15px 0 0;float: right;" onclick="reply('<{$detail.id}>')">提交</a>-->
                                <!--</div>-->
                                <!--<input type="hidden" id="imgs" />-->
                            <!--</div>-->

                            <!--</form>-->
                        <!--</div>-->
                        <!--</if>-->
                    </div>
                    <if condition="$detail.status eq '0'">
                        <a class="btn btn-success btn-rounded y"  onclick="resovel()">处理</a>
                    </if>

                </div>

            </div>

        </div>
    </div>

    <!-- 全局js -->
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/fancybox/jquery.fancybox.js"></script>
    <!-- 自定义js -->
    <script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/ajaxfileupload.js"></script>
    <script type="text/javascript">
        
        function resovel() {

            var index = layer.load(1, {
                shade: [0.1, '#fff'] //0.1透明度的白色背景
            });

            var id="<{$detail.f_id}>";
            layer.alert('确定处理', {title: '提示框', icon: 3}, function (index) {

                $.post('__MODULE__/Message/feedback_solve',{id:id},function (data) {
                               if(data.code=='1001'){
                                   layer.alert(data.result, {title: '提示框', icon: 1});
                               }else {
                                   layer.alert(data.result, {title: '提示框', icon: 1});
                               }
                });

                layer.close(index);
            });
            layer.close(index);
            
        }
        
        
        $(document).ready(function () {
            $('.fancybox').fancybox({
                openEffect: 'none',
                closeEffect: 'none'
            });
        });

        function uploadimgs(){
            var url='__MODULE__/Mypublic/uploadimg';
            layer.load(2);
            $.ajaxFileUpload({
                url:url,//需要链接到服务器地址
                secureuri:false,
                fileElementId:'uploadimg',//文件选择框的id属性file的id
                dataType:'json',
                success:function(data){
                    layer.closeAll('loading');
                    if(data.code=='1001'){
                        var html='<img style="margin: 10px 0 0 60px;height: 60px;width: 60px;" src="'+data.result+'" />';
                        $('#upload').after(html);
                        var img=$('#imgs').val();
                        if(img!=''){
                            $('#imgs').val(img+','+data.result);
                        }else{
                            $('#imgs').val(data.result);
                        }
                    }else{
                        if(data.status=='0'){
                            layer.msg(data.info,{icon:5,time:2000});
                        }else{
                            layer.msg(data.result,{icon:5,time:2000});
                        }
                    }
                }
            });
        }

        function reply(id){
            var content=$('#content').val();
            var imgs=$('#imgs').val();
            if(content==''){
                layer.msg('内容不能为空',{icon:5,time:2000});
                return false;
            }
            $.post('__MODULE__/Message/new_reply_feedback',{content:content,imgs:imgs,id:id},function(data){
                if(data.code=='1001'){
                    window.location.reload();
                }else{
                    if(data.status=='0'){
                        layer.msg(data.info,{icon:5,time:2000});
                    }else{
                        layer.msg(data.result,{icon:5,time:2000});
                    }
                }
            });
        }
    </script>
    
    

</body>

</html>
